var status = 0;

function start() {
	status = -1;
	action(1, 0, 0);
}

function action(mode, type, selection) {
	if (mode == -1) {
		cm.dispose();
	} else {
		if (mode == 0) {
			cm.sendOk("See you later!");
   			cm.dispose();
   			return;
  		}
		if (mode == 1)
   			status++;
  		else
   			status--;
  		if (status == 0) {
			cm.sendYesNo("Do you want to buy some decorations?");
		} else if (status == 1) {
			cm.sendSimple("I can offer you 3 different categories\r\n#b#L1#Christmas Numbers#l\r\n#L2#Christmas Alphabet#l\r\n#L3#Christmas Ornaments#l");
		} else {
			if (selection == 1) {
				cm.openShop(997);
				cm.dispose();
			} else if (selection == 2) {
				cm.openShop(998);
				cm.dispose();
			} else {
				cm.openShop(999);
				cm.dispose();
			}
		}
	}
}